package com.torry.edss.integration.feign.eastmoney.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author torry.wang
 */

@Data
@ApiModel("炸板股池响应数据")
public class EMLimitBombPoolResponse {

    @JsonProperty("rc")
    @ApiModelProperty(value = "返回码", example = "0")
    private Integer returnCode;

    @JsonProperty("rt")
    @ApiModelProperty(value = "响应时间(毫秒)", example = "114")
    private Integer responseTime;

    @JsonProperty("svr")
    @ApiModelProperty(value = "服务器ID", example = "183632152")
    private Long serverId;

    @JsonProperty("lt")
    @ApiModelProperty(value = "数据延迟状态(1:实时 2:延迟)", example = "2")
    private Integer latencyStatus;

    @JsonProperty("full")
    @ApiModelProperty(value = "是否全量数据(0:否 1:是)", example = "0")
    private Integer isFullData;

    @JsonProperty("data")
    @ApiModelProperty("炸板股池数据主体")
    private LimitBombData data;

    @Data
    @ApiModel("炸板股池数据详情")
    public static class LimitBombData {

        @JsonProperty("tc")
        @ApiModelProperty(value = "股票总数", example = "21")
        private Integer totalCount;

        @JsonProperty("qdate")
        @ApiModelProperty(value = "查询日期(yyyyMMdd)", example = "20250506")
        private String date;

        @JsonProperty("pool")
        @ApiModelProperty("炸板股票列表")
        private List<LimitBombStockInfo> pool;
    }

    @Data
    @ApiModel("炸板股票详情")
    public static class LimitBombStockInfo {

        @JsonProperty("c")
        @ApiModelProperty(value = "股票代码", example = "002006")
        private String code;

        @JsonProperty("m")
        @ApiModelProperty(value = "市场类型(1:沪市 0:深市)", example = "0")
        private Integer marketType;

        @JsonProperty("n")
        @ApiModelProperty(value = "股票名称", example = "精工科技")
        private String name;

        @JsonProperty("p")
        @ApiModelProperty(value = "当前价格(单位:厘)", example = "18380")
        private Double price;

        @JsonProperty("ztp")
        @ApiModelProperty(value = "涨停价格(单位:厘)", example = "18920")
        private Double limitUpPrice;

        @JsonProperty("zdp")
        @ApiModelProperty(value = "涨跌幅(%)", example = "6.860465049743652")
        private Double changePercent;

        @JsonProperty("amount")
        @ApiModelProperty(value = "成交额(元)", example = "1571256464")
        private Double amount;

        @JsonProperty("ltsz")
        @ApiModelProperty(value = "流通市值(元)", example = "8365840800")
        private Double ltsz;

        @JsonProperty("tshare")
        @ApiModelProperty(value = "总市值(元)", example = "9553803427.199999")
        private Double totalMarketValue;

        @JsonProperty("hs")
        @ApiModelProperty(value = "换手率(%)", example = "18.392866134643555")
        private Double turnoverRate;

        @JsonProperty("fbt")
        @ApiModelProperty(value = "首次封板时间", example = "93000")
        private String firstLimitTime;

        @JsonProperty("zbc")
        @ApiModelProperty(value = "炸板次数", example = "8")
        private Integer bombCount;

        @JsonProperty("zf")
        @ApiModelProperty(value = "振幅(%)", example = "3.313953399658203")
        private Double amplitude;

        @JsonProperty("zs")
        @ApiModelProperty(value = "涨速(%)", example = "-0.05437738075852394")
        private Double zs;

        @JsonProperty("zttj")
        @ApiModelProperty("涨停统计")
        private LimitUpStats limitUpStats;

        @JsonProperty("hybk")
        @ApiModelProperty(value = "行业板块", example = "专用设备")
        private String industry;

        @Data
        @ApiModel("涨停统计信息")
        public static class LimitUpStats {

            @JsonProperty("days")
            @ApiModelProperty(value = "天数", example = "2")
            private Integer days;

            @JsonProperty("ct")
            @ApiModelProperty(value = "连板数", example = "1")
            private Integer limitCount;
        }
    }
}